/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.crm.action.sale;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.crm.mapper.sale.PotentialCustomerTaskMapper;
public class PotentialCustomerTask extends BaseAction
{
    @Autowired(required=false)
	private PotentialCustomerTaskMapper mapper;
    /**
    潜在客户任务
    */
    
    public Map potentialCustomerTask() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> p_task=mapper.p_task(params,pagination);
        p_task.setPagedListInfo(pagination);
        result.put("p_task", p_task);
        
        return result;
    }
    /**
    新任务
    */
    
    public Map potentialCustomerNTask() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> person=mapper.person(params);
        result.put("person", person);
        
        
        SQLList<SQLMap> s_client=mapper.s_client(params);
        SQLMap s_client_emt=s_client.getExistfirst();
        result.put("s_client", s_client_emt);
        
        return result;
    }
    /**
    修改任务
    */
    
    public Map potentialCustomerUTask() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_task=mapper.s_task(params);
        SQLMap s_task_emt=s_task.getExistfirst();
        result.put("s_task", s_task_emt);
        
        return result;
    }
    /**
    安排给
    */
    
    public Map potentialCustomerArr() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID4",-1);
        SQLList<SQLMap> person_info=mapper.person_info(params);
        result.put("person_info", person_info);
        
        
        params.def("CMID1","-1");
        SQLList<SQLMap> s_firmlist=mapper.s_firmlist(params);
        SQLMap s_firmlist_emt=s_firmlist.getExistfirst();
        result.put("s_firmlist", s_firmlist_emt);
        
        
        params.def("CMID4",-1);
        SQLList<SQLMap> s_firm=mapper.s_firm(params);
        result.put("s_firm", s_firm);
        
        return result;
    }
    /**
    新任务修改
    */
    
    public Map potentialCustomerNTaskSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("task_state","''");
        params.def("task_share","''");
        int CMID4 = mapper.CMID4(params);
        result.put("CMID4", CMID4);
        
        return result;
    }
    /**
    修改任务修改
    */
    
    public Map potentialCustomerUTaskSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("task_state","''");
        params.def("task_share","''");
        int u_task = mapper.u_task(params);
        result.put("u_task", u_task);
        
        return result;
    }
}